<?php

namespace App\Models;

use Eloquent;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;

/**
 *  Goods Model
 *
 * @property int $id
 * @property string $name
 * @property int $status
 * @property string|null $desc
 * @property string|null $info
 * @property Carbon|null $created_at
 * @property Carbon|null $updated_at
 * @method static Builder|Goods newModelQuery()
 * @method static Builder|Goods newQuery()
 * @method static Builder|Goods query()
 * @method static Builder|Goods whereCreatedAt($value)
 * @method static Builder|Goods whereDesc($value)
 * @method static Builder|Goods whereId($value)
 * @method static Builder|Goods whereInfo($value)
 * @method static Builder|Goods whereName($value)
 * @method static Builder|Goods whereStatus($value)
 * @method static Builder|Goods whereUpdatedAt($value)
 * @mixin Eloquent
 */
class Goods extends Model
{
//    use HasUuids;

//    /** @var string table name */
//    protected $table = 'goods';
    /** @var string table primary key */
    protected $primaryKey = 'id';
    /**
     * @var array 可批量分配属性
     */
    protected $fillable = ['name', 'status', 'desc', 'info', 'category_id', 'price', 'stock', 'description', 'image'];


    public function getRouteKeyName(): string
    {
        return 'id';
    }
}
